/*
 * Copyright (C) 2021 Baidu, Inc. All Rights Reserved.
 */
package com.chukun.rpc.core;

import io.netty.util.concurrent.Promise;

/**
 * <p>rpc 框架异步future类<p/>
 *
 * @author chukun
 * @version 1.0
 * @since 1.0-SNAPSHOT
 */
public class TinyRpcFuture<T> {

    private Promise<T> promise;
    private long  timeout;


    public TinyRpcFuture(Promise<T> promise) {
        this(promise, 10);
    }

    public TinyRpcFuture(Promise<T> promise, long timeout) {
        this.promise = promise;
        this.timeout = timeout;
    }

    public Promise<T> getPromise() {
        return promise;
    }

    public void setPromise(Promise<T> promise) {
        this.promise = promise;
    }

    public long getTimeout() {
        return timeout;
    }

    public void setTimeout(long timeout) {
        this.timeout = timeout;
    }
}
